<?php

namespace App\Http\Requests\App;

use App\Http\Requests\ApiRequest;

/**
 * @property string[]|null product_ids
 * @property string try_on_photo
 * @property string|null type - response QrCode Type png or json
 */
class UserFavorStoreRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'product_ids'   => 'sometimes|required|array',
            'product_ids.*' => 'sometimes|required|int',
            'try_on_photo'  => 'required|file'
        ];
    }
}
